1. Field
This invention relates to the field of publish/subscribe messaging. In particular, the invention relates to durable subscriptions in publish/subscribe messaging.
2. Description of the Related Art
In a messaging system that uses publish and subscribe, it is well established that subscribers can make durable or non-durable subscriptions. A non-durable subscription is one that is active only while the subscribing application is connected to the publish/subscribe engine. However, a durable subscription persists even if the subscribing application disconnects from the publish/subscribe engine for a time.
Publish/subscribe implementations that offer durable subscriptions are required to retain all the published messages that are destined for the durable subscription until the subscribing application re-connects. At that point the engine must supply to the re-connected application all the messages that were published to its durable subscription while it was disconnected. In this way, an application is assured that it will never miss a message, although it may receive some messages some time after they were originally published.
The main disadvantage of this arrangement is that it obliges the publish/subscribe engine to store a sequence of messages as they are published until the consuming application reconnects. If the application remains disconnected for a long time, or if the publication rate is extremely high, then the engine may find that it simply cannot store any more messages. At this point it has two options; it either discards messages or it notifies the publishing applications to stop sending messages. The former violates the assurance that clients will never lose a message and the latter penalises the publishing applications and other subscribers.
Therefore, there is a need in the art to address the aforementioned problems.